package me.zhengjie.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.Log;
import me.zhengjie.dto.Resp;
import me.zhengjie.repository.ProductionStationRepository;
import org.springframework.web.bind.annotation.*;

@RestController
@RequiredArgsConstructor
@Api(tags = "工艺")
@RequestMapping("/api/production")
public class ProductionController {

    private final ProductionStationRepository productionStationRepository;

    @Log("查询所有工作站")
    @ApiOperation("查询所有工作站")
    @GetMapping
    public Resp getAllStation(){
        return Resp.builder()
                .status(200)
                .data("allStation",productionStationRepository.findAll())
                .build();
    }
}
